A nil interface has no type and no value. An interface holding a nil pointer has a concrete type but a nil pointer value — this interface is NOT nil, which is a classic Go gotcha in error handling.
An interface value is nil only when both its type and value fields are nil
Assigning a typed nil pointer to an interface creates a non-nil interface
Always return untyped nil (return nil) for error return values
Use errors.As() to inspect error types rather than direct type assertions on possibly-nil errors
This is one of the most common subtle bugs in Go code — affects all interface types, not just error